import { pathToRegexp } from 'path-to-regexp'

let params = []
let regexp = pathToRegexp('/home', params, { end: false })
console.log(regexp) // /^\/home(?:[\/#\?](?=[]|$))?(?=[\/#\?]|[]|$)/i

console.log(regexp.test('/home')) // true
console.log(regexp.test('/home/')) // true
console.log(regexp.test('/home#')) // true
console.log(regexp.test('/home?')) // true
console.log(regexp.test('/home/user')) // true

